from rest_framework.viewsets import ModelViewSet
from django.contrib.auth.models import Group
from apps.meiduo_admin.utils.pagination import MeiduoPagination
from rest_framework.generics import ListAPIView
from apps.meiduo_admin.serializers.admin_group import GroupSerializer, GroupSimpleSerializer


#用户组管理 用户组数据的增删改查功能
class GroupViewsSet(ModelViewSet):
    queryset = Group.objects.all()
    serializer_class = GroupSerializer
    pagination_class = MeiduoPagination


#管理员的管理   新增管理员里面的用户组数据的获取
class GroupSImpleView(ListAPIView):
    queryset = Group.objects.all()
    serializer_class = GroupSimpleSerializer
